﻿namespace CatClient
{
    using System;
    using System.Runtime.CompilerServices;

    internal static class ExceptionExtesion
    {
        public static CatException ToCatException(this Exception exception) => 
            new CatException(exception.Message, exception);

        public static CatException ToCatException(this Exception exception, bool ignoreFuse) => 
            new CatException(exception.Message, exception) { IgnoreFuse = ignoreFuse };

        public static CatException ToCatException(this Exception exception, string message) => 
            new CatException(message, exception);
    }
}

